package com.stylefeng.guns.modular.system.warpper;

import java.text.DecimalFormat;
import java.util.Date;
import java.util.Map;

import com.stylefeng.guns.core.base.warpper.BaseControllerWarpper;
import com.stylefeng.guns.core.util.DateUtil;

public class GjgWarpper extends BaseControllerWarpper{

	public GjgWarpper(Object list) {
        super(list);
    }

    @Override
    public void warpTheMap(Map<String, Object> map) {
    	Date gDate = ((Date)map.get("gDate"));
		map.put("gDate", DateUtil.format(gDate, "yyyy-MM-dd"));
		DecimalFormat df = new DecimalFormat("0.0");
		map.put("gBdmoney", df.format(Math.abs(((Double)map.get("gBdmoney") / 10000))) + "万");
		map.put("gBdhgs", df.format(Math.abs(((Double)map.get("gBdhgs") / 10000)))+ "万");
		
		double gBdgs = ((Double)map.get("gBdgs"));
		map.put("gBdgs", (gBdgs >0 ? "<font color='red'><b>"+df.format(gBdgs/10000) +"万</b></font>" : "<font color='green'><b>"+df.format(gBdgs/10000)+"万</b></font>"));
    }
    
    
}
